<!--界面展示窗口-->
<template>
  <div>
    <braek></braek>
    <!-- 卡片区域 -->
    <el-card>
      <el-table :data="rightsList" border stripe>
        <el-table-column type="index"></el-table-column>
        <el-table-column prop="authName" label="权限说明" width="180"></el-table-column>
        <el-table-column prop="path" label="路径"></el-table-column>
        <el-table-column prop="level" label="权限等级">
          <template slot-scope="scope">
            <el-tag v-if="scope.row.level=='0'">一级权限</el-tag>
            <el-tag v-else-if="scope.row.level=='1'" type="success">二级权限</el-tag>
            <el-tag v-else type="warning">三级权限</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<!--业务逻辑-->
<script>
import braek from "../Bread.vue";
export default {
  components: {
    braek
  },
  data() {
    return {
      rightsList: [],
      
    };
  },
  created() {
    this.getRightlist();
  },
  //方法
  methods: {
    //获取权限列表
    async getRightlist() {
      const { data: res } = await this.$http.get("rights/list");
      if (res.meta.status !== 200) {
        return this.$messag.error("获取权限列表失败");
      }
      this.rightsList = res.data;
    }
  },
  //创建
  
};
</script>



<style lang="scss" scoped>
</style>